---
title: Gel
---

[Gel](https://www.geldata.com/) is a powerful data platform built on top of PostgreSQL.

- Think in objects and graphs instead of tables and JOINs.
- Use the advanced Python SDK, integrated GUI, migrations engine, Auth and AI layers, and much more.
- Run locally, remotely, or in a [fully managed cloud](https://www.geldata.com/cloud).

## Installation

<CodeGroup>
```bash pip
pip install langchain-gel
```

```bash uv
uv add langchain-gel
```
</CodeGroup>

## Setup

1. Run `gel project init`
2. Edit the schema. You need the following types to use the LangChain vectorstore:

```gel
using extension pgvector;

module default {
    scalar type EmbeddingVector extending ext::pgvector::vector<1536>;

    type Record {
        required collection: str;
        text: str;
        embedding: EmbeddingVector;
        external_id: str {
            constraint exclusive;
        };
        metadata: json;

        index ext::pgvector::hnsw_cosine(m := 16, ef_construction := 128)
            on (.embedding)
    }
}
```

> Note: this is the minimal setup. Feel free to add as many types, properties and links as you want!
> Learn more about taking advantage of Gel's schema by reading the [docs](https://docs.geldata.com/learn/schema).

3. Run the migration: `gel migration create && gel migrate`.

## Usage

```python
from langchain_gel import GelVectorStore

vector_store = GelVectorStore(
    embeddings=embeddings,
)
```

See the full usage example [here](/oss/integrations/vectorstores/gel).
